#include <stdio.h>

int main(void) {
	int start = 0, end = 0, n, now, last, cnt = 0, maxCnt = 0, lasti = 0, flag = 0;
	if (scanf("%d", &n));
	if (scanf("%d", &last));
	for (int i = 1; i < n; i++) {
		if (scanf("%d", &now));
		if (now == last) {
			flag = 1;
			cnt++;
		} else {
			cnt = 0;
			last = now;
			lasti = i;
		}
		if (maxCnt < cnt) {
			maxCnt = cnt;
			start = lasti;
			end = i;
		}
	}
	if (flag)
		printf("The longest equal number list is from %d to %d.\n", start, end);
	else
		printf("No equal number list.\n");
	return 0;
}